var uniq = allvalues.GroupBy(x => x.Id).Select(y=>y.First()).Distinct();
var uniqueCategories = repository.GetAllProducts()
.Select(p=>p.Category)
.Distinct();
public static IQueryable<ProdType> GetDistinctProdType(
this IQueryable<ProdInfo> query,
int categoryId)
{
return (from p in query
where p.CatID == categoryId
select p.Type).Distinct();
}